<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="stylesheet" href="css/layui.css" media="all">
    <link rel="stylesheet" href="css/login.css" media="all">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
    <link rel="stylesheet" href="css/common.css" />
</head>

<body  >
    <div class="header">
        <div>
            <img src="images/logo.jpg" width="100" height="100" alt="" />
            <span>山西煤化有限公司</span>
        </div>
        
    </div>
    <div id="loginBox" class="main">
        <div class="layadmin-user-login-main">
            <div class="layadmin-user-login-box layadmin-user-login-header">
                <div>登录</div>
            </div>
            <div class="layadmin-user-login-box layadmin-user-login-body layui-form">
                <div class="layui-form-item">
                    <label class=""  >
                      <img width="23" height="23" src="images/icon/user.png" alt="" />
                    </label>
                    <input type="text" v-model="username" name="username"   lay-verify="required" placeholder="用户名" class="layui-input">
                </div>
                <div class="layui-form-item">
                    <label class=" "  >
                      <img width="25" height="25" src="images/icon/pwd.png" alt="" />
                    </label>
                    <input type="password" v-model="userpwd" name="password"   lay-verify="required" placeholder="密码" class="layui-input">
                </div>
                <div class="layui-form-item" style="margin-bottom: 20px;">
                    <!-- <input type="checkbox" name="remember" lay-skin="primary" title="记住密码"> -->
                    <a href="#" class="layadmin-user-jump-change layadmin-link" style="margin-top: 7px;"> </a>
                </div>
                <div class="btngroup">
                    <button class="loginBtn" lay-submit lay-filter="LAY-user-login-submit" @click="login()">登 录</button>
                </div>
                <div class="layui-form-item loginBo">
                    <span>
                      <a href="register.html">短信登录/注册</a>
                    </span>
                    <span class="forgot">
                       <a href="resetPwd.html">忘记密码？</a>
                    </span>
                </div>
            </div>
        </div>
    </div>
    <style>
    .footer{
      width: 100%;
      margin-top: 100px;
      color: #000;
    }
    .footer>div{
     line-height: 35px;
    }
    .language{
      text-align: center;
      font-size: 18px;
    }
      .copyRight{
        text-align: center;
        font-size:18px;

      }
    </style>
    <div class="footer">
      <div class="language">
        <span>简体&nbsp;</span>|
        <span>繁体&nbsp;</span>|
         <span>English&nbsp;</span>|
          <span>常见问题&nbsp;</span>|
           <span>隐私政策</span>
         </div>
      <div class="copyRight">
        山西煤矿公司版权所有-京ICP备10046444-&nbsp;&nbsp;京公网备11010802020134号-京ICP证110507
      </div>
    </div>
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
    <script type="text/javascript" src="js/static.js"></script>
    <script type="text/javascript" src="js/global.js"></script>
    <script src="layui/layui.all.js"></script>
    <script type="text/javascript">


    </script>
    <script>
    new Vue({
        el: '#loginBox',
        data: {
            msg: "提示",
            username: "",
            userpwd: "",

        },
        mounted() {

        },
        methods: {
            login() {
                let _that = this;

                if (this.username=='admin' && this.userpwd=='admin') {
                    layer.msg("登录成功");
                     window.location.href="home.html";
                    // $.ajax({
                    //         url: preUrl + '/admin/login',
                    //         type: 'POST',
                    //         data: {
                    //             adminName: _that.username,
                    //             password: _that.userpwd
                    //         },
                    //     })
                    //     .done(function(res) {
                    //         if (res.code == 100) {
                    //             layer.msg("登录成功");
                    //             window.location.href = "index.html";
                    //         } else {
                    //             layer.msg(res.extend.msg);
                    //         }
                    //     })

                }else{
                    layer.msg("密码不正确");
                }
            }
        }
    })
    </script>  
</body>

</html>